<?php

namespace App\Http\Controllers\Admin;

use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use DB;
use Illuminate\Support\Facades\Auth;
class IndexController extends Controller
{
    public function index(){
        $data = DB::table("column")->where("pid",0)->get();
        foreach($data as $k => $v){
            $data[$k]->son = DB::table("column")->where("pid",$v->id)->get();
        }
        return view('admin.index',compact('data'));
    }
    public function user(){
        dd(1);
    }
}
